package com.pubinfo.passbook.esb.controller;

import com.pubinfo.passbook.common.model.bo.uccp.ShortMessageParam;
import com.pubinfo.passbook.common.model.shortMessage.QueryMessageBodyParam;
import com.pubinfo.passbook.uccp.SendSMSService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author litiewang
 * @version 1.0
 * @date 2021/12/14 17:17
 */
@RestController
@RequestMapping(value = "uccp")
@Api(tags = "短信相关接口")
@Slf4j
public class UccpController {
  @Autowired
  SendSMSService sendSMSService;
  
  @PostMapping("sendShortMessage")
  @ApiOperation(value = "发送短信")
  public String sendShortMessage(@RequestBody ShortMessageParam param) {
    return sendSMSService.sendShortMessage(param);
  }
  
  @PostMapping("queryMessage")
  @ApiOperation(value = "查询")
  public String queryMessage(@RequestBody QueryMessageBodyParam cert) {
    return sendSMSService.queryMessage(cert);
  }
}
